/**
 * 系统管理员信息管理
 * @type {SysUserApi}
 */
const sysUserApi = new class SysUserApi extends BaseApi {
    constructor() {
        super('/api/sysUser')
    }

    async listByLastCount(count) {
        return (await rxajax.get(this.using(`/list-by-last-count/${count}`))).data.data
    }

    async getUserMenu(userId) {
        return (await rxajax.get(this.using(`/get-user-menu/${userId}`))).data.data
    }

    async count(sysUser) {
        return (await rxajax.get(this.using('/count'), sysUser)).data.data
    }

    async updateUserMenu(addSysUserMenuList, deleteSysUserMenuList) {
        return (await rxajax.post(this.using('/update-user-menu'), {
            addSysUserMenuList, deleteSysUserMenuList,
        }, {type: 'json'})).data
    }
}()